﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace IntelligentAgriculture.Contracts.Dto.Output
{
    public class RoutesOutput
    {
        /// <summary>
        /// 路由路径
        /// </summary>
        public string Path { get; set; }
        /// <summary>
        /// 组件路径
        /// </summary>
        public string Component { get; set; }
        /// <summary>
        /// 重定向
        /// </summary>
        public string Redirect { get; set; }
        /// <summary>
        /// 路由名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 元数据
        /// </summary>
        public Meta Meta { get; set; }
        /// <summary>
        /// 子级
        /// </summary>
        [JsonIgnore]
        public List<RoutesOutput>? Children { get; set; }
    }

    public class Meta
    {
        /// <summary>
        /// 是否隐藏
        /// </summary>
        public bool Hidden { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 是否缓存
        /// </summary>
        public bool KeepAlive { get; set; }
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 角色
        /// </summary>
        public string[] Roles { get; set; }
    }
}
